﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="HienThiGioHang.aspx.cs" Inherits="WebApplication.HienThiGioHang" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
<asp:GridView ID="gvGioHang" runat="server" AutoGenerateColumns="false" 
            EmptyDataText ="Không có sản phẩm nào trong giỏ hàng" GridLines="None" 
            Width ="100%" CellPadding = "5" ShowFooter = "true" 
        DataKeyNames = "IdSanPham" onrowdatabound="gvGioHang_RowDataBound" 
        onrowcommand="gvGioHang_RowCommand">
         <HeaderStyle HorizontalAlign="Left" BackColor="#3D7169" ForeColor="#FFFFFF"  />
            <FooterStyle HorizontalAlign="Right" BackColor="#6C6B66" ForeColor="#FFFFFF" />
            <AlternatingRowStyle BackColor = "#F8F8F8" />
            <Columns>
            <asp:BoundField DataField="IdSanPham" Visible="false"/>
            <asp:BoundField DataField ="Ten" HeaderText = "Sản phẩm" />
            <asp:TemplateField HeaderText = "Số Lượng">
            <ItemTemplate>
            <asp:TextBox runat="Server" ID = "txtSoLuong" Columns = "10" Text='<%#Eval("SoLuong") %>'></asp:TextBox><br />
            <asp:LinkButton runat="Server" ID="btnXoa" Text ="Xóa" CommandName = "XoaCT_GH" CommandArgument =  '<%#Eval("IDSanPham") %>' style = "font-size:11px"></asp:LinkButton>
            </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Gia" HeaderText="Giá" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign ="Right" />
                        <asp:BoundField DataField="ThanhTien" HeaderText="Thành tiền" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign ="Right" />
            </Columns>
        </asp:GridView>
      <br /><br /><br />
        <asp:Button ID="btnTiepTuc" runat="server" Text="Tiếp tục mua hàng" 
                onclick="btnTiepTuc_Click" />
        <asp:Button ID="btnCap" runat="server" Text="Cập nhật" onclick="btnCap_Click" />
        <asp:Button ID="btnXoaGioHang" runat="server" Text="Xóa giỏ Hàng" 
                onclick="btnXoaGioHang_Click" />
        <asp:Button ID="btnThanhToan" runat="server" Text="Thanh toán" />
        </div>
</asp:Content>
  
